<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/layout/common.xhtml">
	<ui:define name="body">
		<h:form>
			<p:panel header="#{msg['massai.manterGrupoProducao.header']}">
				<h:panelGrid>
					<h:outputLabel value="#{msg['massai.manterGrupoProducao.descricao']}" for="descricao" />
					<p:inputText id="descricao" value="#{grupoProducaoBean.grupoProducao.descricao}" style="width: 300px;" maxlength="255" />
				</h:panelGrid>
			</p:panel>
			<p:toolbar>
				<f:facet name="left">
					<p:commandButton value="#{msg['massai.comum.pesquisar']}" />
					<span class="ui-separator">
		                <span class="ui-icon ui-icon-grip-dotted-vertical" />
		            </span>

		            <p:commandButton value="#{msg['massai.comum.incluir']}" 
						action="manterGrupoProducaoCadastro" ajax="false" immediate="true" />

					<!-- <p:commandButton value="#{msg['massai.comum.incluir']}" /> -->
				</f:facet>
			</p:toolbar>
			
			<p:dataTable style="margin-top: 15px;" emptyMessage="#{msg['massai.comum.emptyMessage']}" 
				value="#{grupoProducaoBean.listaGrupoProducao}" var="grupo" sortMode="multiple" >
				<f:facet name="header"><h:outputText value="#{msg['massai.manterGrupoProducao.grupoProducao']}" /></f:facet>
				
				<p:column headerText="#{msg['massai.manterGrupoProducao.codigo']}" sortBy="#{grupo.id}" width="60">
					<h:outputText value="#{grupo.id}" />
				</p:column>
				
				<p:column headerText="#{msg['massai.manterGrupoProducao.descricao']}" sortBy="#{grupo.descricao}">
					<h:outputText value="#{grupo.descricao}" />
				</p:column>
				
				<p:column headerText="#{msg['massai.manterGrupoProducao.status']}" sortBy="#{grupo.status}" width="100">
					<h:outputText value="#{grupo.status}" />
				</p:column>
				
				<p:column headerText="#{msg['massai.comum.detalhar']}" width="50">
					<h:commandLink>
						<img src="#{facesContext.externalContext.requestContextPath}/imagens/ico_detail.png" 
							width="19" height="19" border="0" name="#{msg['massai.comum.detalhar']}" 
							alt="#{msg['massai.comum.detalhar']}" />
					</h:commandLink>
				</p:column>
				
				<p:column headerText="#{msg['massai.comum.editar']}" width="32">
					<h:commandLink>
						<img src="#{facesContext.externalContext.requestContextPath}/imagens/ico_edit.png" 
							width="19" height="19" border="0" name="#{msg['massai.comum.editar']}" 
							alt="#{msg['massai.comum.editar']}" />
					</h:commandLink>
				</p:column>
			</p:dataTable>
		</h:form>
	</ui:define>
</ui:composition>
</html>